Integrand size = 21, antiderivative size = 92 \[ \int \frac {\cot (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {2 \text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {a}}\right )}{\sqrt {a} d}-\frac {\text {arctanh}\left (\frac {\sqrt {a+a \sec (c+d x)}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {2} \sqrt {a} d}-\frac {1}{d \sqrt {a+a \sec (c+d x)}} \]
2*arctanh((a+a*sec(d*x+c))^(1/2)/a^(1/2))/d/a^(1/2)-1/2*arctanh(1/2*(a+a*s ec(d*x+c))^(1/2)*2^(1/2)/a^(1/2))/d*2^(1/2)/a^(1/2)-1/d/(a+a*sec(d*x+c))^( 1/2)
Result contains higher order function than in optimal. Order 5 vs. order 3 in optimal.
Time = 0.06 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.62 \[ \int \frac {\cot (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\frac {\operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},\frac {1}{2} (1+\sec (c+d x))\right )-2 \operatorname {Hypergeometric2F1}\left (-\frac {1}{2},1,\frac {1}{2},1+\sec (c+d x)\right )}{d \sqrt {a (1+\sec (c+d x))}} \]
(Hypergeometric2F1[-1/2, 1, 1/2, (1 + Sec[c + d*x])/2] - 2*Hypergeometric2 F1[-1/2, 1, 1/2, 1 + Sec[c + d*x]])/(d*Sqrt[a*(1 + Sec[c + d*x])])
Time = 0.30 (sec) , antiderivative size = 98, normalized size of antiderivative = 1.07, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.571, Rules used = {3042, 25, 4368, 25, 27, 96, 25, 27, 174, 73, 219, 220}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\cot (c+d x)}{\sqrt {a \sec (c+d x)+a}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int -\frac {1}{\cot \left (c+d x+\frac {\pi }{2}\right ) \sqrt {a \csc \left (c+d x+\frac {\pi }{2}\right )+a}}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\int \frac {1}{\cot \left (\frac {1}{2} (2 c+\pi )+d x\right ) \sqrt {\csc \left (\frac {1}{2} (2 c+\pi )+d x\right ) a+a}}dx\) |
\(\Big \downarrow \) 4368 |
\(\displaystyle \frac {a^2 \int -\frac {\cos (c+d x)}{a (1-\sec (c+d x)) (\sec (c+d x) a+a)^{3/2}}d\sec (c+d x)}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {a^2 \int \frac {\cos (c+d x)}{a (1-\sec (c+d x)) (\sec (c+d x) a+a)^{3/2}}d\sec (c+d x)}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a \int \frac {\cos (c+d x)}{(1-\sec (c+d x)) (\sec (c+d x) a+a)^{3/2}}d\sec (c+d x)}{d}\) |
\(\Big \downarrow \) 96 |
\(\displaystyle -\frac {a \left (\frac {1}{a \sqrt {a \sec (c+d x)+a}}-\frac {\int -\frac {a \cos (c+d x) (2-\sec (c+d x))}{(1-\sec (c+d x)) \sqrt {\sec (c+d x) a+a}}d\sec (c+d x)}{2 a^2}\right )}{d}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {a \left (\frac {\int \frac {a \cos (c+d x) (2-\sec (c+d x))}{(1-\sec (c+d x)) \sqrt {\sec (c+d x) a+a}}d\sec (c+d x)}{2 a^2}+\frac {1}{a \sqrt {a \sec (c+d x)+a}}\right )}{d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle -\frac {a \left (\frac {\int \frac {\cos (c+d x) (2-\sec (c+d x))}{(1-\sec (c+d x)) \sqrt {\sec (c+d x) a+a}}d\sec (c+d x)}{2 a}+\frac {1}{a \sqrt {a \sec (c+d x)+a}}\right )}{d}\) |
\(\Big \downarrow \) 174 |
\(\displaystyle -\frac {a \left (\frac {\int \frac {1}{(1-\sec (c+d x)) \sqrt {\sec (c+d x) a+a}}d\sec (c+d x)+2 \int \frac {\cos (c+d x)}{\sqrt {\sec (c+d x) a+a}}d\sec (c+d x)}{2 a}+\frac {1}{a \sqrt {a \sec (c+d x)+a}}\right )}{d}\) |
\(\Big \downarrow \) 73 |
\(\displaystyle -\frac {a \left (\frac {\frac {2 \int \frac {1}{2-\frac {\sec (c+d x) a+a}{a}}d\sqrt {\sec (c+d x) a+a}}{a}+\frac {4 \int \frac {1}{\frac {\sec (c+d x) a+a}{a}-1}d\sqrt {\sec (c+d x) a+a}}{a}}{2 a}+\frac {1}{a \sqrt {a \sec (c+d x)+a}}\right )}{d}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle -\frac {a \left (\frac {\frac {4 \int \frac {1}{\frac {\sec (c+d x) a+a}{a}-1}d\sqrt {\sec (c+d x) a+a}}{a}+\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {a}}}{2 a}+\frac {1}{a \sqrt {a \sec (c+d x)+a}}\right )}{d}\) |
\(\Big \downarrow \) 220 |
\(\displaystyle -\frac {a \left (\frac {\frac {\sqrt {2} \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {2} \sqrt {a}}\right )}{\sqrt {a}}-\frac {4 \text {arctanh}\left (\frac {\sqrt {a \sec (c+d x)+a}}{\sqrt {a}}\right )}{\sqrt {a}}}{2 a}+\frac {1}{a \sqrt {a \sec (c+d x)+a}}\right )}{d}\) |
-((a*(((-4*ArcTanh[Sqrt[a + a*Sec[c + d*x]]/Sqrt[a]])/Sqrt[a] + (Sqrt[2]*A rcTanh[Sqrt[a + a*Sec[c + d*x]]/(Sqrt[2]*Sqrt[a])])/Sqrt[a])/(2*a) + 1/(a* Sqrt[a + a*Sec[c + d*x]])))/d)
3.2.74.3.1 Defintions of rubi rules used
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[ {p = Denominator[m]}, Simp[p/b Subst[Int[x^(p*(m + 1) - 1)*(c - a*(d/b) + d*(x^p/b))^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] && Lt Q[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntL inearQ[a, b, c, d, m, n, x]
Int[((e_.) + (f_.)*(x_))^(p_)/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_] :> Simp[f*((e + f*x)^(p + 1)/((p + 1)*(b*e - a*f)*(d*e - c*f))), x] + S imp[1/((b*e - a*f)*(d*e - c*f)) Int[(b*d*e - b*c*f - a*d*f - b*d*f*x)*((e + f*x)^(p + 1)/((a + b*x)*(c + d*x))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && LtQ[p, -1]
Int[(((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_)))/(((a_.) + (b_.)*(x_))* ((c_.) + (d_.)*(x_))), x_] :> Simp[(b*g - a*h)/(b*c - a*d) Int[(e + f*x)^ p/(a + b*x), x], x] - Simp[(d*g - c*h)/(b*c - a*d) Int[(e + f*x)^p/(c + d *x), x], x] /; FreeQ[{a, b, c, d, e, f, g, h}, x]
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(- 1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Int[cot[(c_.) + (d_.)*(x_)]^(m_.)*(csc[(c_.) + (d_.)*(x_)]*(b_.) + (a_))^(n _), x_Symbol] :> Simp[-(d*b^(m - 1))^(-1) Subst[Int[(-a + b*x)^((m - 1)/2 )*((a + b*x)^((m - 1)/2 + n)/x), x], x, Csc[c + d*x]], x] /; FreeQ[{a, b, c , d, n}, x] && IntegerQ[(m - 1)/2] && EqQ[a^2 - b^2, 0] && !IntegerQ[n]
Leaf count of result is larger than twice the leaf count of optimal. \(228\) vs. \(2(75)=150\).
Time = 1.80 (sec) , antiderivative size = 229, normalized size of antiderivative = 2.49
method | result | size |
default | \(-\frac {\sqrt {-\frac {2 a}{\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\, \left (-\left (\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1\right )^{\frac {3}{2}}+\left (1-\cos \left (d x +c \right )\right )^{2} \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\, \csc \left (d x +c \right )^{2}+6 \sqrt {2}\, \arctan \left (\frac {\sqrt {2}\, \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}{2}\right )+3 \arctan \left (\frac {1}{\sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}}\right )-4 \sqrt {\left (1-\cos \left (d x +c \right )\right )^{2} \csc \left (d x +c \right )^{2}-1}\right )}{6 d a}\) | \(229\) |
-1/6/d/a*(-2*a/((1-cos(d*x+c))^2*csc(d*x+c)^2-1))^(1/2)*((1-cos(d*x+c))^2* csc(d*x+c)^2-1)^(1/2)*(-((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^(3/2)+(1-cos(d*x +c))^2*((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^(1/2)*csc(d*x+c)^2+6*2^(1/2)*arct an(1/2*2^(1/2)*((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^(1/2))+3*arctan(1/((1-cos (d*x+c))^2*csc(d*x+c)^2-1)^(1/2))-4*((1-cos(d*x+c))^2*csc(d*x+c)^2-1)^(1/2 ))
Leaf count of result is larger than twice the leaf count of optimal. 180 vs. \(2 (75) = 150\).
Time = 0.35 (sec) , antiderivative size = 384, normalized size of antiderivative = 4.17 \[ \int \frac {\cot (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\left [\frac {2 \, \sqrt {a} {\left (\cos \left (d x + c\right ) + 1\right )} \log \left (-8 \, a \cos \left (d x + c\right )^{2} - 4 \, {\left (2 \, \cos \left (d x + c\right )^{2} + \cos \left (d x + c\right )\right )} \sqrt {a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} - 8 \, a \cos \left (d x + c\right ) - a\right ) + \frac {\sqrt {2} {\left (a \cos \left (d x + c\right ) + a\right )} \log \left (-\frac {\frac {2 \, \sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a}} - 3 \, \cos \left (d x + c\right ) - 1}{\cos \left (d x + c\right ) - 1}\right )}{\sqrt {a}} - 4 \, \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{4 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}, \frac {\sqrt {2} {\left (a \cos \left (d x + c\right ) + a\right )} \sqrt {-\frac {1}{a}} \arctan \left (\frac {\sqrt {2} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sqrt {-\frac {1}{a}} \cos \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right ) - 2 \, \sqrt {-a} {\left (\cos \left (d x + c\right ) + 1\right )} \arctan \left (\frac {2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, a \cos \left (d x + c\right ) + a}\right ) - 2 \, \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{2 \, {\left (a d \cos \left (d x + c\right ) + a d\right )}}\right ] \]
[1/4*(2*sqrt(a)*(cos(d*x + c) + 1)*log(-8*a*cos(d*x + c)^2 - 4*(2*cos(d*x + c)^2 + cos(d*x + c))*sqrt(a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c)) - 8 *a*cos(d*x + c) - a) + sqrt(2)*(a*cos(d*x + c) + a)*log(-(2*sqrt(2)*sqrt(( a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/sqrt(a) - 3*cos(d*x + c) - 1)/(cos(d*x + c) - 1))/sqrt(a) - 4*sqrt((a*cos(d*x + c) + a)/cos(d*x + c)) *cos(d*x + c))/(a*d*cos(d*x + c) + a*d), 1/2*(sqrt(2)*(a*cos(d*x + c) + a) *sqrt(-1/a)*arctan(sqrt(2)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*sqrt(-1 /a)*cos(d*x + c)/(cos(d*x + c) + 1)) - 2*sqrt(-a)*(cos(d*x + c) + 1)*arcta n(2*sqrt(-a)*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c)/(2*a*cos (d*x + c) + a)) - 2*sqrt((a*cos(d*x + c) + a)/cos(d*x + c))*cos(d*x + c))/ (a*d*cos(d*x + c) + a*d)]
\[ \int \frac {\cot (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\cot {\left (c + d x \right )}}{\sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )}}\, dx \]
\[ \int \frac {\cot (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int { \frac {\cot \left (d x + c\right )}{\sqrt {a \sec \left (d x + c\right ) + a}} \,d x } \]
Time = 0.75 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.21 \[ \int \frac {\cot (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=-\frac {\sqrt {2} {\left (\frac {2 \, \sqrt {2} \arctan \left (\frac {\sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{2 \, \sqrt {-a}}\right )}{\sqrt {-a}} - \frac {\arctan \left (\frac {\sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{\sqrt {-a}}\right )}{\sqrt {-a}} + \frac {\sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}}{a}\right )}}{2 \, d \mathrm {sgn}\left (\cos \left (d x + c\right )\right )} \]
-1/2*sqrt(2)*(2*sqrt(2)*arctan(1/2*sqrt(2)*sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a)/sqrt(-a))/sqrt(-a) - arctan(sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a)/sqrt( -a))/sqrt(-a) + sqrt(-a*tan(1/2*d*x + 1/2*c)^2 + a)/a)/(d*sgn(cos(d*x + c) ))
Timed out. \[ \int \frac {\cot (c+d x)}{\sqrt {a+a \sec (c+d x)}} \, dx=\int \frac {\mathrm {cot}\left (c+d\,x\right )}{\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}}} \,d x \]